import type { Phone, PhonePageReq } from '@/type/PhoneType.ts'
import type { ApiPageResp } from '@/type/ApiType.ts'
import { createDiscreteApi } from 'naive-ui'
import { OperatingSystemEnum } from '@/enum/PhoneEnum.ts'
import type { Brand } from '@/type/BrandType.js'

const { message } = createDiscreteApi(['message'])

export function useBrandApi() {
  const allBrand = async (): Promise<Brand[]> => {
    return mock()
  }

  function mock():Brand[] {
    const brandNames = ['苹果', '三星', '华为', '小米', 'OPPO', 'vivo', '一加', '魅族']
    const mockBrands: Brand[] = Array.from({ length: brandNames.length }, (_, i) => ({
      id: i + 1+'_',
      name: brandNames[i]
    }))
    return mockBrands
  }
  return {
    allBrand,
  }
}

